import React, { Component } from 'react'
import {Redirect, Route, Switch} from "react-router-dom"
import loadable from '../util/loadable'
export default class index extends Component {
    render() {
        return (
            <div>
                {/* 配置路由 */}
                <Switch>
                    <Route path="/index" component={loadable(()=>import("../views/index"))} exact/>
                    <Route path="/router" component={loadable(()=>import("../views/router"))} exact/>
                    <Route path="/login" component={loadable(()=>import("../views/login"))} exact/>
                    <Route path="/regist" component={loadable(()=>import("../views/regist"))} exact/>
                    <Route path="/text" component={loadable(()=>import("../views/text"))} exact/>
                    <Route path="/talkabout" component={loadable(()=>import("../views/talkabout"))} />
                    <Route path="/detlist/:kind" component={loadable(()=>import("../views/detlist"))} />
                    <Redirect from="/" to="/index" exact/>
                    <Route component={loadable(()=>import("../views/no"))} />
                </Switch>
            </div>
        )
    }
}
